import {post,text} from '@/common/request';
import {requestParams, urlApiClientContent, urlPublicContent} from './ServerService';

const url = urlApiClientContent + 'app/';
const publicUrl=urlApiClientContent +"public/";

// 资料文档 目录查询
export function docLabelList(name) {
    return post(url +  requestParams('docLabelList', {name}), null);
}


// 资料文档 详情查询 pageNo=0&pageSize=20&labelId=1&name=内容
export function docContentList({pageNo,pageSize,labelId,name}) {
    return post(url +  requestParams('docContentList', {pageNo,pageSize,labelId,name}), null);
}

// // 资料文档 下载计数
// export function docIncrement(docId) {
//     return post(url +  requestParams('docIncrement', {docId}), null);
// }
// // 预览图片
// export function smallImgPreview(id) {
//     return post(url +  requestParams('smallImgPreview', {id}), null);
// }

// type 1 教材资源  2 资料文档  
// 公共查询资料文档 
export function resourcesHead(type, resourcesId) {
    return post(publicUrl + requestParams('resourcesHead', { type, resourcesId }), null);
}

// 查询目录树
export function textBookCatalog({  textBookId}) {
    return post(publicUrl + requestParams('textBookCatalog', { textBookId }), null);
}
// 公共下载
export function docIncrement(docId) {
    return post(publicUrl +  requestParams('docIncrement', {docId}), null);
}
// 预览图片
export function smallImgPreview(docId) {
    return post(publicUrl +  requestParams('smallImgPreview', {docId}), null);
}
